package com.customize.tool.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Author: suichen
 * @Date: 2022-02-27 13:43
 * @Description: 自定义配置信息类(用于保存配置的信息)
 */
@Component
@ConfigurationProperties(prefix = "user")
public class UserProperties {
    /***
     * 自定义信息，如果配置文件中配置了这个信息，则默认值会被覆盖，反之则采用默认值
     */
    /**
     * 用户名
     */
    private String userName = "root";
    private String password = "root";

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
